perm filename VARIAN.ME[UP,DOC]4 blob sn#522863 filedate 1980-07-17 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	The system program VARIAN outputs data to the Varian Plotter (device VRN)
C00009 00003	Zen and the art of using the Varian to make XGP-like listings
C00013 00004	Making extra large pages with XGPSYN and XGPSYG
C00018 ENDMK
CāŠ—;
The system program VARIAN outputs data to the Varian Plotter (device VRN)
from files properly formatted for this purpose.

This program takes a sequence of up to 15 (decimal) files of mostly raw
raster data and outputs the files, concatenated, to the VRN in dump mode.
The drawing will be centered on the VRN.  An optional outline can be drawn
around either the whole drawing or every group of N files in the drawing.
In order to be able to provide the dump-mode data to the VRN as fast as
possible, this program uses overlapped mode (mode 117) and opens all the
specified files before output to the VRN is begun.

The program first asks about outlining the drawing and then requests the
name(s) of the file(s) you want to print.  The outlining options are:
(1) no outlining -- print the concatenation of all the files without
intervening blank paper; (2) make one outline around the concatenation of
all the files; (3) make a separate outline around every group of N files
(where N is from 1 to 9 inclusive) -- in this case a small amount of
blank paper is run out between outlined groups.  Up to 15 files can be
printed, using one of the above outlining options.  The program will ask
for one filename at a time; when you have finished typing in all the
filenames, type just carriage return to the "File:" prompt to signify the
end of the file list.

To get the left half of output duplicated on the right half, end the
outline selection line with an altmode instead of a carriage return.  Note
that this feature Replaces whatever would have appeared in the right half
of your output with a copy of the left half.  If your output covers only,
say, the left half of the paper, then the copy will be only of the left
half of this left half.  The copy will only replace existing data (which
might be all zero, but which must exist in the input files).

If there are any errors in the VRN output, the program will report and
interpret the error data returned by the system.  You can then have
the program retry printing the entire collection of files previously
specified by saying CONTINUE to the monitor.

If device VRN is not available, this program will wait for it, with an
appropriate message when it begins to wait.

The data format in each file to be printed is as follows (files in this
format can be written by the XGPSYN/XGPSYG programs, see HPM for more
details):

	The first 200 (octal) words of each file contain general parameters
	for the whole file.  The parameters used by this program are:
		Word 2/	words of file per scanline
		Word 4/ number of scanlines of data in file
		Word 6/ bits of actual data per scanline, + 37 (decimal)
	(Note: "Word 2" means the third word of the file.  The first word
	of the file is Word 0.)

	If an outline is to be made, every file must have the same value
	in word 2 of these parameters and the number of bits of actual
	data per scanline (from word 6) must be less than or equal to the
	actual width of an entire VRN scanline (currently claimed to be
	=4224); also, the words per scanline (word 2 of file) must be
	sufficient to include the number of bits of data given by word 6,
	or else no outline can be drawn.  Word 6 is used to determine
	where to draw the right margin line, and how to center the drawing
	on the VRN.  If the requirements for outlining are not met, this
	program will make the drawing without the outline (after typing
	a warning message to that effect).

	Each entire file after the first 200 words consists of contiguous
	blocks, one per scanline, of raster data, with each block
	containing as many words as indicated by word 2 of the file.  The
	first word of each block, however, is not taken as raster data,
	but is ignored (a VRN dump-mode Group Command Word is placed there
	to tell the system how much raster data follows).

Zen and the art of using the Varian to make XGP-like listings
  (by HPM)


First: calm your mind - the ordeal is long and painful,
       but in the end you will triumph


Second: Prepare your .XGP file in the usual manner


Third: incant (your typein is in upper case):

        R XGPSYN;FILE.XGP/B/NODPY        (file.xgp is your file)
        page #:1
        page #:O
        output file name:P1
        page #:2
        page #:O
        output file name:P2
        page #:3
        page #:O
        output file name:P3

       (and so on, until the last page is done. XGPSYN types out the page
        number of the page just processed for all pages but the last. When it
        fails to type out a page number, you know the last page has been done.)

        page #:Q      (this terminates XGPSYN)


Fourth: incant:

	R VAR2P
	file 1:P1
	file 2:P2
	output file:P12.VRN
        file 1:P3
        file 2:P4
	output file:P34.VRN

        (and so on until the last file is processed. If you had an odd
	 number of pages, repeat your favorite one twice, since the
	 input is pairwise.  Also check the disk space available as you
	 run this program; it makes HUGE files.  If disk is about to
	 run out, stop.  You can do the first few pages in one batch,
	 then delete the files, and do other batches later).

         ↑C         (this terminates VAR2P)

Fifth:	incant

	R VARIAN
	outline:1
	file:P12
	file:P34
 	file:P56
        
	(and so on, for a maximum of 15 page pairs. You'll have used up
         all the available disk before getting to 15 pairs (=30 pages)
	 anyway, so don't worry about the limit. end the input with a
	 blank line)

        file:       (carriage return activates VARIAN; your listing should
			start coming out)


Sixth:	Check for any spoiled pages. You can run VARIAN again to get
	extra copies without all the preceding effort.


Seventh: When you are satisfied with your listing, delete the files
	 P1, P2, P3, etc and, especially P12.VRN, P34.VRN, ... .
	 They are truly gigantic.

Eighth:  Using scissors and the paper knife, cut the pages along
	 the thin lines. The paper knife is good for the final
	 cuts, but scissors are needed to roughly trim to pages
	 to a size that can be handled by the knife.

Ninth:  Breathe a sigh of relief.
Making extra large pages with XGPSYN and XGPSYG
  (by HPM)

	When XGPSYN is used to list pages of files on the XGP or
Varian, the default page size is 8.5 inches (1700 pixels) wide by 11
inches (2200 pixels) long.

	The physical page width is controlled by the RMAR switch.  For
instance, adding /RMAR=1900 after the file name will give a page width
of 9.5 inches on the Varian (not on the XGP, of course; its paper being
only 8.5 inches wide).

	The page length is controlled by the TMAR, PMAR and BMAR
switches.  TMAR is the margin at the top of the printed portion of the
page, PMAR is the window for printing and BMAR is the bottom margin.
Files containing .XGP y selects can write into the top and bottom
margins, but in all cases the physical page length is the sum of the
values of the three switches.  The defaults are
/TMAR=100/PMAR=2000/BMAR=100, for a total of 2200 pixels.  Pages can be
shortened or lengthened by adjusting any of the three switches.
Changing PMAR is most esthetic.  XGPSYN and its smarter sibling do not
support indefinite page lengths (PMAR=0).

	Because the whole page being assembled resides in the XGPSYN
core image, there is a size limit.  Currently the area of the assembled
page cannot exceed about 1.4 times the area of the 8.5 by 11 default.
If you attempt to exceed the limits, XGPSYN will crash in various
obscure ways because of bugs in SAIL's out of core detector when the
core image is bigger than 128K.

	It is possible to trade off length for width; for instance the
switch settings /RMAR=3400/TMAR=50/PMAR=1000/BMAR=50 will generate a
page twice as wide and half as tall as usual.

	It is possible to generate much larger pages in small pieces.  I
will demonstrate the idea by giving a concrete example, making a page
of standard length and twice standard width.

R XGPSYN;File/RMAR=3400/TMAR=50/PMAR=1000/BMAR=50/EDGE/NODPY/B
Page #:1	make page one. because of T,P and BMAR we get only top 5.5 in
Page #:O	output it to file P1A.VRN (O means data-compressed. This
File:P1A.VRN	  saves disk space, but P is safer if load is high)
Page #:/YSHIFT=-1100   offsets subsequent pages by 5.5 inches
Page #:1	so now page 1 gives 5.5 inches below bottom
Page #:O	of first window.
File:P1B.VRN
Page:Q		quit. If one wanted to do another 5.5 inch swath,
		the command would have been /YSHIFT=-2200

R VARIAN
Outline? 2
File:P1A
File:P1B
File:

	The /NODPY switch suppresses unnecessary synthesizer display of
portions of the assembled pages.  The /EDGE switch makes letters that
straddle the boundary of the 5.5 inch swaths come out right.  It slows
the program down a little.  /B selects binary mode, which is what you
need for things sent to the XGP or Varian.